home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Auge 4000 / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).zip / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).adf / arp-pro1.3 / NEW_MANUAL / FindFirst_ADDENDUM < prev    next >
Text File  |  1990-06-22  |  3KB  |  63 lines

  1.  
  2.  
  3.  
  4.  
  5.      FindFirst(39.0)      ARP Programmers Manual       FindFirst(39.0)
  6.  
  7.  
  8.  
  9.      ADDENDUM FOR
  10.       FindFirst - Search for multilevel pattern match
  11.  
  12.      ADDITIONS IN V1.3
  13.            The FindFirst() and FindNext() functions have been rewritten
  14.            in V1.3 of ARP to provide built in support for directory
  15.            traversal, similar to the "ALL" keyword support available
  16.            in various Amiga CLI commands.  The enhancement has been
  17.            made in a backwards compatible way such that applications
  18.            which had used the documented FindFirst() interface prior
  19.            to V1.3 of arp.library will continue to work.
  20.  
  21.            The AnchorPath data structure's "ap_Strlen" field, which
  22.            was defined as a LONGWORD value in V1.1, has been switched
  23.            to a WORD definition.  The remaining WORD is split into a
  24.            reserved field, and a BYTE ap_Flags field.  Any applications
  25.            which used FindFirst() under V1.1 initialized the ap_Flags
  26.            field to ZERO as the high-order word of ap_Strlen.
  27.  
  28.            The new ALL support is enabled by setting bit APB_DOWILD
  29.            in the ap_Flags variable.  If this bit is set, you can use
  30.            two other bits for directory traversal:
  31.            
  32.                If you SET APB_DODIR when a directory entry has been
  33.            returned from FindFirst/FindNext, the next call to
  34.            FindNext() will ENTER that directory.  If APB_DODIR is
  35.            left CLEARED, the next FindNext() call will continue on
  36.            the current directory level.
  37.            
  38.            The bit APB_DIDDIR indicates that the current directory
  39.            entry has already been processed.  Thus, normally you
  40.            should check APB_DIDDIR and if it is set do NOT set
  41.            APB_DODIR.
  42.  
  43.            Also note the flag bit "APB_ITSWILD" which is set by
  44.            FindFirst() to indicate if the name specified is a wildcard.
  45.            If APB_ITSWILD is CLEAR, the name passed to FindFirst() is a
  46.            simple filename, if SET, the name passed includes some
  47.        wildcard characters.
  48.  
  49.        Following is a short pseudocode example for using the new
  50.        ALL capability:
  51.  
  52.            anchor->ap_Flags = APF_DOWILD;
  53.        rc = FindFirst( pattern, anchor);
  54.        while ( rc == 0 )
  55.               {
  56.               if ( anchor->ap_Info.fib_DirEntryType >= 0 )
  57.                   {
  58.                   if ( anchor->Flags & APF_DIDDIR )
  59.                       anchor->Flags |= APF_DODIR;
  60.                   anchor->Flags &= ~APF_DIDDIR;
  61.                   }
  62.               }
  63.